<{include file="../Common/head.html"}>
<body>
	<table class="table">
		<tr>
			<td class="th" colspan="20">用户列表</td>
		</tr>
		<tr class="tableTop">
			<td class="tdLittle1">ID</td>
			<td>用户名</td>
			<td>回答数</td>
			<td>被采纳数</td>
			<td>提问数</td>
			<td>金币</td>
			<td>经验</td>
			<td>最后登录时间</td>
			<td>最后登录IP</td>
			<td>注册时间</td>
			<td>帐号状态</td>
			<td>操作</td>
		</tr>
		<{foreach from=$alluser item=user}>
		<tr>
			<td><{$user.uid}></td>
			<td><{$user.username}></td>
			<td><{$user.answer}></td>
			<td><{$user.accept}></td>
			<td><{$user.ask}></td>
			<td><{$user.point}></td>
			<td><{$user.exp}></td>
			<td><{$user.logintime|date_format:"%Y-%m-%d %H:%M:%S"}></td>
			<td><{$user.loginip}></td>
			<td><{$user.restime|date_format:"%Y-%m-%d %H:%M:%S"}></td>
			<td><{if $user.islock==0}>正常<{elseif $user.islock==2}>管理员<{else}>锁定<{/if}></td>
			<td><{if $user.islock==0}><a href="<{$smarty.const.__APP__}>?c=member&a=up&uid=<{$user.uid}>">提管</a><{/if}> 
				<{if $user.islock==0 || $user.islock==2 }><a href="<{$smarty.const.__APP__}>?c=member&a=lock&uid=<{$user.uid}>">锁定</a><{/if}><{if $user.islock==1}><a href="<{$smarty.const.__APP__}>?c=member&a=unlock&uid=<{$user.uid}>">解锁</a><{/if}> <a href="javascript:;" onclick="isdel(<{$user.uid}>)">删除</a></td>
				<script>
					function isdel(id){
						var ok = confirm("你确认要删除这个用户吗，他将无法恢复");
						if(ok){
							location.href="<{$smarty.const.__APP__}>?c=member&a=del&uid="+id;
						}
					}
				</script>
		</tr>
		<{/foreach}>
	</table>

</body>
</html>